//
//  ListDiyDEditTableViewCell.m
//  Mahjong
//
//  Created by KING on 16/9/11.
//  Copyright © 2016年 swift. All rights reserved.
//

#import "ListDiyDEditTableViewCell.h"

@implementation ListDiyDEditTableViewCell
- (IBAction)deleAction:(id)sender {
    self.number = self.number-1;
    self.numLabel.text = [NSString stringWithFormat:@"%ld",self.number];
    
}
- (IBAction)addAction:(id)sender {
    self.number = self.number+1;
    self.numLabel.text = [NSString stringWithFormat:@"%ld",self.number];

}
- (IBAction)remoAction:(id)sender {
    [self.myDelegate remo:self.number];
}
-(void)drawRect:(CGRect)rect{
    [super drawRect:rect];
//    self.number = 45;
    self.numLabel.text = [NSString stringWithFormat:@"%ld",self.number];
    self.deleButton.backgroundColor = [UIColor colorWithRed:239/255.0 green:239/255.0 blue:239/255.0 alpha:1];
    self.addButton.backgroundColor = [UIColor colorWithRed:239/255.0 green:239/255.0 blue:239/255.0 alpha:1];
//    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(numAdd) name:@"numAdd" object:nil];
}
-(void)nsarray:(NSMutableArray *)arra success:(numBlock)successBlock{
    [arra addObject:_numLabel.text];
    successBlock(arra);
    
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
